<template>
  <div>
    <h4>肌张力评定</h4>
    <el-card class="box-card">
      <el-table
        :data="pgForm"
        stripe
        border
        :span-method="spanMethod"
        style="width: 100%;margin-top: 20px"
        :header-cell-style="{background:'#edf6fa'}"
        :cell-style="cellStyle"
      >
        <el-table-column prop="zhiti" label=" " width="80px" align="center"></el-table-column>
        <el-table-column prop="buwei" label=" " width="60px" align="center"></el-table-column>
        <el-table-column label="左" align="center">
          <template slot-scope="scope">
            <el-radio-group v-model="scope.row.radio1">
              <el-radio :label="0">0</el-radio>
              <el-radio :label="1">Ⅰ</el-radio>
              <el-radio :label="2">Ⅰ+</el-radio>
              <el-radio :label="3">Ⅱ</el-radio>
              <el-radio :label="4">Ⅲ</el-radio>
            </el-radio-group>
          </template>
        </el-table-column>
        <el-table-column label="右" align="center">
          <template slot-scope="scope">
            <el-radio-group v-model="scope.row.radio2">
              <el-radio :label="0">0</el-radio>
              <el-radio :label="1">Ⅰ</el-radio>
              <el-radio :label="2">Ⅰ+</el-radio>
              <el-radio :label="3">Ⅱ</el-radio>
              <el-radio :label="4">Ⅲ</el-radio>
            </el-radio-group>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
    <!--    <textarea style="width: 100%">-->
    <!--      评分标准：-->
    <!--      0级:正常肌张力(肌张力不增加)；-->
    <!--      I级:肌张力略微增加；-->
    <!--      Ⅰ+级:肌张力明显增加；-->
    <!--      Ⅱ级:肌张力严重增加，被动运动困难；-->
    <!--      Ⅲ级:僵直，受累部分被动屈膝时呈现僵直状态不能活动。-->
    <!--    </textarea>-->
  </div>
</template>

<script>

export default {
  name: "muscle_assess1",
  title: "肌张力评定",
  created() {
    if(this.istrans){
      this.pgForm=this.fromdata
    }
  },
  props:{
    fromdata:{},
    istrans:false,
  },
  data() {
    return {
      pgForm: [
        {
          zhiti:'上肢',
          buwei:'肩',
          radio1:'',
          radio2:'',
        },{
          zhiti:'上肢',
          buwei:'肘',
          radio1:'',
          radio2:'',
        },{
          zhiti:'上肢',
          buwei:'腕',
          radio1:'',
          radio2:'',
        },{
          zhiti:'上肢',
          buwei:'手',
          radio1:'',
          radio2:'',
        },{
          zhiti:'下肢',
          buwei:'髋',
          radio1:'',
          radio2:'',
        },{
          zhiti:'下肢',
          buwei:'膝',
          radio1:'',
          radio2:'',
        },{
          zhiti:'下肢',
          buwei:'足',
          radio1:'',
          radio2:'',
        },{
          zhiti:'下肢',
          buwei:'踝',
          radio1:'',
          radio2:'',
        },
      ],
    };
  },
  methods:{
    spanMethod({rowIndex,columnIndex}){
      if(columnIndex === 0){
        if(rowIndex%4 === 0){
          return [4,1]
        }else{
          return [0,0]
        }
      }
    },
    cellStyle({columnIndex}){
      if(columnIndex<=1){
        return 'background-color:#edf6fa'
      }else {
        return ''
      }
    }
  }
}
</script>

<style scoped>
</style>
